package com.apps.ftapp.fragment;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.apps.ftapp.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class TabPageFragment extends Fragment {

    private int page;
    public static final String PAGE_POSITION = "page_position";
    private String[] names;
    private TextView tv_fragment;


    public static TabPageFragment getInstance(int position) {
        TabPageFragment tabPageFragment = new TabPageFragment();
        Bundle bundle = new Bundle();
        bundle.putInt(PAGE_POSITION, position);
        tabPageFragment.setArguments(bundle);
        return tabPageFragment;
    }

    public TabPageFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        page = this.getArguments().getInt(PAGE_POSITION);
        // names = getResources().getStringArray(R.array.tab_title);
        System.out.println(page);
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_tab_page, container, false);
    }

}
